<template>
	<div class="lookhouselist">
		<myheader :type_title="type_title" :title="title"></myheader>
		<div class="nav">
			<p class="interval">|</p>
			<span @click="tabs(index)" v-bind:class="{'active':act==index}" v-for="(tab,index) in tabarr">{{tab}}</span>
		</div>
		<div class="info-W">
			<div class="info" v-show="str[0]">
				<span><img src="../../../static/image/no_data.png" /></span>
				<p>暂无待看清单</p>
				<div>有想要约看的房源？直接在楼盘或房源页面点击“预约看房”即可。</div>
				<router-link to="">立即预约</router-link>
			</div>
			<div class="info-Y" v-show="str[1]">
				<span><img src="../../../static/image/no_data.png" /></span>
				<p>暂无待看清单</p>
				<div>有想要约看的房源？直接在楼盘或房源页面点击“预约看房”即可。</div>
				<router-link to="">立即预约</router-link>
			</div>
		</div>
	</div>
</template>

<script>
	import myheader from '@/components/user/myheader'
	export default {
		name: "lookhouselist",
		data() {
			return {
				title: "我的收藏",
				type_title: "yright",
				tabarr: ["待看房", "已看房"],
				act: 0,
				str: [true, false]
			}
		},
		methods: {
			tabs(index) {
				this.act = index;
				for (var i = 0; i < 2; i++) {
					this.str[i] = false
				}
				this.str[index] = true
			}
		},
		components: {
			myheader
		}
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
	.lookhouselist {
		width: 100%;
		height: auto;
		background: #F1F1F1;
	}
	
	.nav {
		width: 100%;
		height: 0.8rem;
		margin-top: 0.05rem;
		background: white;
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}
	
	.nav .interval {
		display: block;
		position: absolute;
		left: 50%;
	}
	
	.nav span {
		width: 50%;
		height: 100%;
		display: inline-block;
		text-align: center;
		line-height: 0.8rem;
		color: #666666;
		font-size: 0.3rem;
	}
	
	.nav .active {
		border-bottom: 4px solid #F3B240;
		box-sizing: border-box;
	}
	
	.info {
		width: 100%;
		height: auto;
		margin-top: 0.05rem;
		background: white;
	}
	
	.info-W {
		width: 100%;
		height: 5.5rem;
		padding: 0 0.3rem;
		box-sizing: border-box;
	}
	
	.info-W span {
		display: inline-block;
		width: 100%;
		height: 2.8rem;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.info-W img {
		width: 1.35rem;
		height: 1.15rem;
	}
	
	.info-W p {
		width: 100%;
		text-align: center;
		color: #999999;
		font-size: 0.35rem;
	}
	
	.info-W div {
		width: 100%;
		height: 0.6rem;
		color: #999999;
		font-size: 0.3rem;
		text-align: center;
		margin-top: 0.5rem;
	}
	
	.info-W a {
		display: inline-block;
		width: 100%;
		height: 0.7rem;
		text-align: center;
		line-height: 0.7rem;
		color: white;
		font-size: 0.35rem;
		border-radius: 0.1rem;
		background: #F4811F;
		margin-top: 0.5rem;
	}
</style>